<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<title>test: TEST/Person.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">test
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.7 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="annotated.html"><span>类</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_60f03a562a2e326bd289c232b1b46d6c.html">TEST</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Person.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_person_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">/* COPYRIGHT NOTICE</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Copyright (c) 2014 MPIG</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * All rights reserved.</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">*/</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#ifndef  _PERSON_H_</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#define  _PERSON_H_</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="keyword">using namespace </span>std;</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="class_person.html">   34</a></span>&#160;<span class="keyword">class  </span><a class="code" href="class_person.html">Person</a>                       </div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;{   </div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <a class="code" href="class_person.html">Person</a>(<span class="keywordtype">char</span>*, <span class="keywordtype">int</span>, <span class="keywordtype">char</span>);         </div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <a class="code" href="class_person.html">Person</a>(<a class="code" href="class_person.html">Person</a>&amp;);            </div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <a class="code" href="class_person.html">Person</a>()    {Name = 0; Age = 0; Gender = 0;}</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="class_person.html#a700ffd693321c5fe6880262acf43d4da">   47</a></span>&#160;    <a class="code" href="class_person.html#a700ffd693321c5fe6880262acf43d4da">~Person</a>() { <span class="keyword">delete</span> Name; }  </div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <span class="keywordtype">void</span>  SetName(<span class="keywordtype">char</span>*);   </div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="class_person.html#a350cc59b9aaa7c6b43eed8388dcf6202">   58</a></span>&#160;    <span class="keywordtype">void</span>  <a class="code" href="class_person.html#a350cc59b9aaa7c6b43eed8388dcf6202">SetAge</a>(<span class="keywordtype">int</span> age) {Age = age;} </div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="class_person.html#a9d6c89090bcad5220add863ed9811177">   64</a></span>&#160;    <span class="keywordtype">void</span>  <a class="code" href="class_person.html#a9d6c89090bcad5220add863ed9811177">SetGender</a>(<span class="keywordtype">char</span> gender) </div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    {Gender = (gender == <span class="charliteral">&#39;m&#39;</span> ? 0 : 1);}</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keywordtype">char</span>  *GetName(<span class="keywordtype">char</span>*);      </div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div>
<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="class_person.html#a33a70635106555c76535096ed35c08e5">   78</a></span>&#160;    <span class="keywordtype">int</span>   <a class="code" href="class_person.html#a33a70635106555c76535096ed35c08e5">GetAge</a>() {<span class="keywordflow">return</span> Age; }       </div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div>
<div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="class_person.html#add324409f5be9424ecebbe9f59fa180f">   84</a></span>&#160;    <span class="keywordtype">char</span>  <a class="code" href="class_person.html#add324409f5be9424ecebbe9f59fa180f">GetGender</a>(){<span class="keywordflow">return</span>(Gender == 0 ?<span class="charliteral">&#39;m&#39;</span>:<span class="charliteral">&#39;f&#39;</span>);}</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    <span class="keywordtype">void</span>  Show();                   </div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    <span class="keywordtype">char</span>        *Name;      </div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <span class="keywordtype">unsigned</span>        Age : 7;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <span class="keywordtype">unsigned</span>     Gender : 1;</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="keywordtype">void</span>  CopyName(<span class="keywordtype">char</span>*);           </div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;};</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="class_person_html_a700ffd693321c5fe6880262acf43d4da"><div class="ttname"><a href="class_person.html#a700ffd693321c5fe6880262acf43d4da">Person::~Person</a></div><div class="ttdeci">~Person()</div><div class="ttdoc">析构函数 </div><div class="ttdef"><b>Definition:</b> Person.h:47</div></div>
<div class="ttc" id="class_person_html_a350cc59b9aaa7c6b43eed8388dcf6202"><div class="ttname"><a href="class_person.html#a350cc59b9aaa7c6b43eed8388dcf6202">Person::SetAge</a></div><div class="ttdeci">void SetAge(int age)</div><div class="ttdoc">设置年龄 </div><div class="ttdef"><b>Definition:</b> Person.h:58</div></div>
<div class="ttc" id="class_person_html_a9d6c89090bcad5220add863ed9811177"><div class="ttname"><a href="class_person.html#a9d6c89090bcad5220add863ed9811177">Person::SetGender</a></div><div class="ttdeci">void SetGender(char gender)</div><div class="ttdoc">设置性别 </div><div class="ttdef"><b>Definition:</b> Person.h:64</div></div>
<div class="ttc" id="class_person_html_add324409f5be9424ecebbe9f59fa180f"><div class="ttname"><a href="class_person.html#add324409f5be9424ecebbe9f59fa180f">Person::GetGender</a></div><div class="ttdeci">char GetGender()</div><div class="ttdoc">获取性别 </div><div class="ttdef"><b>Definition:</b> Person.h:84</div></div>
<div class="ttc" id="class_person_html_a33a70635106555c76535096ed35c08e5"><div class="ttname"><a href="class_person.html#a33a70635106555c76535096ed35c08e5">Person::GetAge</a></div><div class="ttdeci">int GetAge()</div><div class="ttdoc">获取年龄 </div><div class="ttdef"><b>Definition:</b> Person.h:78</div></div>
<div class="ttc" id="class_person_html"><div class="ttname"><a href="class_person.html">Person</a></div><div class="ttdoc">提供一个基类 </div><div class="ttdef"><b>Definition:</b> Person.h:34</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2014年 十二月 29日 星期一 19:28:15 , 为 test使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.7
</small></address>
</body>
</html>
